/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ui.user;

import hibernate.entity.Accounts;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;
import ui.common.AbstractUIBean;

/**
 *
 * @author Neo
 */
@ManagedBean
@RequestScoped
public class AbstractUserBean extends AbstractUIBean {

    /**
     * Creates a new instance of AbstractUserBean
     */
    int roleID = 3;
    Accounts acc;

    public AbstractUserBean() {
    }

    public String isAuthor() {
        acc = getCurrentAccount();
        if (acc.getRoleId() != 3 && acc.getAccountId() !=2) {
            return "userlogin";
        }
        return "";
    }
}
